package mx.messaging;

extern class AbstractConsumer extends MessageAgent {
	var resubscribeAttempts : Int;
	var resubscribeInterval : Int;
	var subscribed(default,null) : Bool;
	var timestamp : Float;
	function new() : Void;
	function receive(?timestamp : Float) : Void;
	function subscribe(?clientId : String) : Void;
	function unsubscribe(?preserveDurable : Bool) : Void;
	private var _shouldBeSubscribed : Bool;
	private function buildSubscribeMessage() : mx.messaging.messages.CommandMessage;
	private function buildUnsubscribeMessage(preserveDurable : Bool) : mx.messaging.messages.CommandMessage;
	private function resubscribe(event : flash.events.TimerEvent) : Void;
	private function setSubscribed(value : Bool) : Void;
	private function startResubscribeTimer() : Void;
	private function stopResubscribeTimer() : Void;
}
